home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
076-100
/
scopedisk89
/
amrtization
/
amort.bas
< prev
next >
Wrap
BASIC Source File
|
1995-03-19
|
4KB
|
167 lines
Introit:
CLS
WINDOW 2,"Amortization Scheduler",(0,0)-(631,186),8
PRINT SPC(24);"Amortization Scheduler"
PRINT :PRINT SPC(30);"by -DAVE-"
t=TIMER:WHILE TIMER<t+3:WEND
arg2=-1
WHILE arg2
CLS
PRINT
PRINT " Name ";
arg=-1
WHILE arg
LINE INPUT;Nam$
IF Nam$<>"" THEN arg=0
WEND
CLS
LOCATE 2,2:PRINT UCASE$(Nam$)
INPUT " Principle ", Principle
LOCATE 3,13:PRINT USING "$$#####,.##";Principle
INPUT " Interest ", Interest
LOCATE 4,1:PRINT STR$(Interest);"% Annual Percentage Rate"
INPUT " Term (yrs.) ", Term
LOCATE 5,1:PRINT STR$(Term);" year term ";Term*12;" scheduled payments"
arg=-1
WHILE arg
LOCATE 6,1:PRINT " Month # - starting payment";
INPUT m%
IF m%<13 AND m%>0 THEN arg=0
WEND
LOCATE 7,1:PRINT " Year of starting payment";
INPUT y%
LOCATE 8,1:PRINT " To [s]creen or [p]rinter";
INPUT p$
PRINT:PRINT " Is this information correct? ";
a$ = UCASE$(INPUT$(1))
IF LEFT$(a$,1) = "Y" THEN arg2=0
WEND
Conversions:
CompInt = (Interest/100)/12
CompTerm = Term * 12
PBal = Principle
Nlength = LEN(Nam$)
PMT = PBal / ((1-(1+CompInt)^-CompTerm)/(CompInt))
my$=RIGHT$(STR$(m%),2)+"/"+RIGHT$(STR$(y%),4)
CLS
scrn:
IF UCASE$(p$)<>"P" THEN arg=-1
WHILE arg
PRINT UCASE$(Nam$);SPC(50-Nlength);
PRINT USING"Principle $$#####,.##";Principle
FOR x = 1 TO Nlength
PRINT "*";
NEXT
PRINT SPC(50-Nlength);"Interest =";STR$(Interest);"% A.P.R."
PRINT SPC(50);"Term = ";STR$(Term);" year";
IF Term <> 1 THEN
PRINT "s"
ELSE
PRINT ""
END IF
PRINT SPC(50);"Starting m/y: ";my$
PRINT SPC(50);
PRINT USING"Payment = $$#####,.##";PMT
PRINT ""
PRINT "Pymt ";
PRINT "Present Accrued Accrued"
PRINT " No. Principle Interest ";
PRINT "Balance Mo/Yr Principle Interest"
PRINT ""
WHILE PMTNO < CompTerm
NewInt = PBal * CompInt
PPrin = PMT - NewInt:IF PPrin > PBal THEN PPrin = PBal
PBal = PBal - PPrin
APrin = APrin + PPrin
AInt = AInt + NewInt
PMTNO = PMTNO + 1
PRINT USING "###-";PMTNO;
y$=STR$(y%):y$=RIGHT$(y$,2)
m$=STR$(m%):m$=RIGHT$(m$,2)
PRINT m$+"/"+y$;
m%=m%+1
IF m%=13 THEN
y%=y%+1
m%=1
END IF
PRINT USING "$$#####,.## ";PPrin;
PRINT USING "$$#####,.## ";NewInt;
PRINT USING "$$#####,.## ";PBal;
PRINT USING "$$#####,.## ";APrin;
PRINT USING "$$#####,.##";AInt
WEND
PRINT ""
PRINT USING "Initial Payment =$$#####,.##";PMT
PRINT USING "Final Payment = $$#####,.##";PPrin+NewInt
arg=0
WEND
Prtr:
IF UCASE$(p$)="P" THEN arg=-1
WHILE arg
OPEN "prt:" FOR OUTPUT AS 1
PRINT#1, UCASE$(Nam$);SPC(50-Nlength);
PRINT#1, USING"Principle $$#####,.##";Principle
FOR x = 1 TO Nlength
PRINT#1, "*";
NEXT
PRINT#1, SPC(50-Nlength);"Interest =";STR$(Interest);"% A.P.R."
PRINT#1, SPC(50);"Term = ";STR$(Term);" year";
IF Term <> 1 THEN
PRINT#1, "s"
ELSE
PRINT#1, ""
END IF
PRINT#1, SPC(50);"Starting m/y: ";my$
PRINT#1, SPC(50);
PRINT#1, USING"Payment = $$#####,.##";PMT
PRINT#1, ""
PRINT#1, "Pymt ";
PRINT#1, " Present Accrued Accrued"
PRINT#1, " No. Mo/Yr Principle Interest ";
PRINT#1, "Balance Principle Interest"
PRINT#1, ""
WHILE PMTNO < CompTerm
NewInt = PBal * CompInt
PPrin = PMT - NewInt:IF PPrin > PBal THEN PPrin = PBal
PBal = PBal - PPrin
APrin = APrin + PPrin
AInt = AInt + NewInt
PMTNO = PMTNO + 1
PRINT#1, USING "###-";PMTNO;
y$=STR$(y%):y$=RIGHT$(y$,2)
m$=STR$(m%):m$=RIGHT$(m$,2)
PRINT#1, m$+"/"+y$;
m%=m%+1
IF m%=13 THEN
y%=y%+1
m%=1
END IF
PRINT#1, USING "$$#####,.## ";PPrin;
PRINT#1, USING "$$#####,.## ";NewInt;
PRINT#1, USING "$$#####,.## ";PBal;
PRINT#1, USING "$$#####,.## ";APrin;
PRINT#1, USING "$$#####,.##";AInt
WEND
PRINT #1, ""
PRINT#1, USING "Initial Payment =$$#####,.##";PMT
PRINT#1, USING "Final Payment = $$#####,.##";PPrin+NewInt
CLOSE 1
arg=0
WEND
PRINT "Exit y/n";
INPUT Ex$
WINDOW CLOSE 2
IF UCASE$(Ex$)="N" THEN
GOTO Introit
ELSE
END
END IF